#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int Func(int money)
{
	int total = money;
	int empty = money;
	while (empty > 1)
	{
		total = total + empty / 2;
		empty = empty / 2 + empty % 2;
	}
	return total;
}
int main()
{
	printf("%d\n", Func(20));
}